package com.jeesite.modules.dataScreen.service;

import com.alibaba.fastjson2.JSONObject;
import com.google.common.collect.ImmutableMultimap;
import com.jeesite.modules.dataScreen.spi.IndustryCollection;
import com.jeesite.modules.dataScreen.web.vo.IndustryIndexVo;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.jeesite.modules.dataScreen.web.vo.IndustryIndexVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class BasicsFacilityService {

    @Resource
    private IndustryIndexService industryIndexService;

    public JSONObject roadManagement() {
        return industryIndexService.standardLayout("roadManagementP2.json");
    }


    //首页基础设施
    public JSONObject index() {
        return industryIndexService.standardLayout("p1_basics.json");
    }

    public JSONObject harborShipP2() {
        return industryIndexService.standardLayout("p2_harborShip.json");
    }

    public JSONObject constructP3() {
        return industryIndexService.standardLayout("p3_construct.json");

    }

    public JSONObject maintainP3() {
        return industryIndexService.standardLayout("p3_maintain.json");
    }

    public JSONObject shippingIntelligenceTube() {
        return industryIndexService.standardLayout("shippingIntelligenceTubeP3.json");
    }

    public JSONObject portIntelligentControl() {
        return industryIndexService.standardLayout("portIntelligentControlP3.json");
    }

    public JSONObject shipWiseGovernance() {
        return industryIndexService.standardLayout("shipWiseGovernanceP3.json");
    }

    public JSONObject highSpeedTravel() {
        return industryIndexService.standardLayout("highSpeedTravelP3.json");
    }

    public JSONObject highroadLcjz() {
        return industryIndexService.standardLayout("p3_basics_highroad_govern.json");
    }

    public JSONObject highroadLcjzReal() {
        return industryIndexService.standardLayout("p3_basics_highroad_govern_realTime.json");
    }

    public JSONObject otherKpi() {
        return industryIndexService.standardLayout("p1_otherKPI.json");
    }

    public JSONObject otherKpiClick() {
        return industryIndexService.standardLayout("p1_otherKPIClick.json");
    }

    //民航管理
    public JSONObject aviationP2() {
        return industryIndexService.standardLayout("p2_aviation_basics.json");
    }

    //机场智设
    public JSONObject aviationConstructP3() {
//        JSONObject jsonObject = industryIndexService.standardLayout("p3_construct_aviation.json");
//        List<IndustryIndexVo> indexVos = (List<IndustryIndexVo>) jsonObject.get("guarantee");
//        IndustryIndexVo lk = indexVos.get(1);
//        lk.setIndicatorValue(IndustryIndexVo.addAll(indexVos.get(4), indexVos.get(7), indexVos.get(10), indexVos.get(13), indexVos.get(16)).toString());
//        IndustryIndexVo hy = indexVos.get(2);
//        hy.setIndicatorValue(IndustryIndexVo.addAll(indexVos.get(5), indexVos.get(8), indexVos.get(11), indexVos.get(14), indexVos.get(17)).toString());
//        return jsonObject;
        return industryIndexService.standardLayout("p3_construct_aviation.json");
    }
}
